<?php
	session_start();
	$reg=$_SESSION["correo_1_tutor"];
	if (!isset($reg))
		header("Location: index2.php");
		require_once('includes/conexionbd.inc.php');
		$query="UPDATE `view_disponibilidad_tutor` SET  `6` = '{$_POST['l6']}', `7`='{$_POST['l7']}', `8`='{$_POST['l8']}', `9`='{$_POST['l9']}', `10`='{$_POST['l10']}', `11`='{$_POST['l11']}', `12`='{$_POST['l12']}', `13`='{$_POST['l13']}', `14`='{$_POST['l14']}', `15`='{$_POST['l15']}', `16`='{$_POST['l16']}', `17`='{$_POST['l17']}', `18`='{$_POST['l18']}', `19`='{$_POST['l19']}', `20`='{$_POST['l20']}', `21`='{$_POST['l21']}', `22`='{$_POST['l22']}' WHERE `tutor_doc_tutor` = $reg->doc_tutor AND `dia` = 'lunes'";
		$res = mysql_query($query, $conn) or die (mysql_error($conn));
		$query="UPDATE `view_disponibilidad_tutor` SET  `6` = '{$_POST['m6']}', `7`='{$_POST['m7']}', `8`='{$_POST['m8']}', `9`='{$_POST['m9']}', `10`='{$_POST['m10']}', `11`='{$_POST['m11']}', `12`='{$_POST['m12']}', `13`='{$_POST['m13']}', `14`='{$_POST['m14']}', `15`='{$_POST['m15']}', `16`='{$_POST['m16']}', `17`='{$_POST['m17']}', `18`='{$_POST['m18']}', `19`='{$_POST['m19']}', `20`='{$_POST['m20']}', `21`='{$_POST['m21']}', `22`='{$_POST['m22']}' WHERE `tutor_doc_tutor` = $reg->doc_tutor AND `dia` = 'martes'";
		$res = mysql_query($query, $conn) or die(mysql_error());
		$query="UPDATE `view_disponibilidad_tutor` SET  `6` = '{$_POST['x6']}', `7`='{$_POST['x7']}', `8`='{$_POST['x8']}', `9`='{$_POST['x9']}', `10`='{$_POST['x10']}', `11`='{$_POST['x11']}', `12`='{$_POST['x12']}', `13`='{$_POST['x13']}', `14`='{$_POST['x14']}', `15`='{$_POST['x15']}', `16`='{$_POST['x16']}', `17`='{$_POST['x17']}', `18`='{$_POST['x18']}', `19`='{$_POST['x19']}', `20`='{$_POST['x20']}', `21`='{$_POST['x21']}', `22`='{$_POST['x22']}' WHERE `tutor_doc_tutor` = $reg->doc_tutor AND `dia` = 'miercoles'";
		$res = mysql_query($query, $conn) or die(mysql_error());
		$query="UPDATE `view_disponibilidad_tutor` SET  `6` = '{$_POST['j6']}', `7`='{$_POST['j7']}', `8`='{$_POST['j8']}', `9`='{$_POST['j9']}', `10`='{$_POST['j10']}', `11`='{$_POST['j11']}', `12`='{$_POST['j12']}', `13`='{$_POST['j13']}', `14`='{$_POST['j14']}', `15`='{$_POST['j15']}', `16`='{$_POST['j16']}', `17`='{$_POST['j17']}', `18`='{$_POST['j18']}', `19`='{$_POST['j19']}', `20`='{$_POST['j20']}', `21`='{$_POST['j21']}', `22`='{$_POST['j22']}' WHERE `tutor_doc_tutor` = $reg->doc_tutor AND `dia` = 'jueves'";
		$res = mysql_query($query, $conn) or die(mysql_error());
		$query="UPDATE `view_disponibilidad_tutor` SET  `6` = '{$_POST['v6']}', `7`='{$_POST['v7']}', `8`='{$_POST['v8']}', `9`='{$_POST['v9']}', `10`='{$_POST['v10']}', `11`='{$_POST['v11']}', `12`='{$_POST['v12']}', `13`='{$_POST['v13']}', `14`='{$_POST['v14']}', `15`='{$_POST['v15']}', `16`='{$_POST['v16']}', `17`='{$_POST['v17']}', `18`='{$_POST['v18']}', `19`='{$_POST['v19']}', `20`='{$_POST['v20']}', `21`='{$_POST['v21']}', `22`='{$_POST['v22']}' WHERE `tutor_doc_tutor` = $reg->doc_tutor AND `dia` = 'viernes'";
		$res = mysql_query($query, $conn) or die(mysql_error());
		$query="UPDATE `view_disponibilidad_tutor` SET  `6` = '{$_POST['s6']}', `7`='{$_POST['s7']}', `8`='{$_POST['s8']}', `9`='{$_POST['s9']}', `10`='{$_POST['s10']}', `11`='{$_POST['s11']}', `12`='{$_POST['s12']}', `13`='{$_POST['s13']}', `14`='{$_POST['s14']}', `15`='{$_POST['s15']}', `16`='{$_POST['s16']}', `17`='{$_POST['s17']}', `18`='{$_POST['s18']}', `19`='{$_POST['s19']}', `20`='{$_POST['s20']}', `21`='{$_POST['s21']}', `22`='{$_POST['s22']}' WHERE `tutor_doc_tutor` = $reg->doc_tutor AND `dia` = 'sabado'";
		$res = mysql_query($query, $conn) or die(mysql_error());
		$query="UPDATE `view_disponibilidad_tutor` SET  `6` = '{$_POST['d6']}', `7`='{$_POST['d7']}', `8`='{$_POST['d8']}', `9`='{$_POST['d9']}', `10`='{$_POST['d10']}', `11`='{$_POST['d11']}', `12`='{$_POST['d12']}', `13`='{$_POST['d13']}', `14`='{$_POST['d14']}', `15`='{$_POST['d15']}', `16`='{$_POST['d16']}', `17`='{$_POST['d17']}', `18`='{$_POST['d18']}', `19`='{$_POST['d19']}', `20`='{$_POST['d20']}', `21`='{$_POST['d21']}', `22`='{$_POST['d22']}' WHERE `tutor_doc_tutor` = $reg->doc_tutor AND `dia` = 'domingo'";
		$res = mysql_query($query, $conn) or die(mysql_error());
		echo "Horario Actualizado con exito!"
?>


 